<?php
    $this->headTitle('Tỉnh/Thành Phố','append');
?>
<div class="dashboard-menu dashboard-admin">
    <span class="back">&nbsp;</span>
    <h1>Tỉnh/Thành Phố</h1>                                
</div>
<div class="row placeholders">
    <div class="col-md-12">
        <div class="widget-big">
            <div class="table table-responsive">
                <div class="search-result">
                    <table class="table table-bordetext-danger table-striped table-condensed table-hover" border="0" cellspacing="0" cellpadding="0">
                        <thead>
                            <tr class="warning">
                                <th style="width:10%;">STT</th>
                                <th style="width:10%;">Mã địa chính</th>
                                <th style="width:20%;">Tên hành chính</th>
                                <th style="width:10%;">Loại</th>
                                <th style="width:10%;">Chức năng</th>                                                                
                            </tr>
                        </thead>
                        <tbody>
                        <?php
                            $i=0;
                            foreach ($this->provinceList as $pro){
                                $i++;                                    
                        ?>
                            <tr>
                                <td style="width:10%;" class="text-left"><?=$i?></td>
                                <td style="width:10%;" class="text-left"><?=$pro['provinceId'];?></td>
                                <td style="width:20%;" class="text-left"><?=$pro['provinceName'];?></td>
                                <td style="width:10%;" class="text-left"><?=$pro['typeName'];?></td>                                
                                <td style="width:10%;" class="text-left">
                                <?php if($this->acl->checkAllowed(array('moduleName'=>'admin','controllerName'=>'province','actionName'=>'edit'))) ?>                                    
                                    <a class="glyphicon glyphicon-pencil" href="<?=$this->url(array('module'=>'admin', 'controller'=>'province', 'action'=>'edit', 'comId'=>$pro['provinceId']))?>" title="Sửa thông tin địa danh"></a>
                                    &nbsp;&nbsp;                                    
                                <?php if($this->acl->checkAllowed(array('moduleName'=>'admin','controllerName'=>'province','actionName'=>'delete'))) ?>                                    
                                    <a class="glyphicon glyphicon-remove" href="<?=$this->url(array('module'=>'admin', 'controller'=>'province', 'action'=>'delete', 'comId'=>$pro['provinceId']))?>" title="Xoá địa danh"></a>                                    
                                </td>
                            </tr>
                        <?php
                            } 
                        ?>
                        </tbody>
                    </table>
                </div>
            </div> 
            <div class="clearfix"></div>           
        </div>
        <div class="widget-big">
            <div class="search-result text-left">
                <a class="glyphicon glyphicon-floppy-save" href="<?=$this->url(array('module'=>'admin', 'controller'=>'province', 'action'=>'export'))?>" title="Xuất database"> Download this table</a>
            </div>
            <div class="clearfix"></div>
        </div>        
    </div>
</div>